package com.ssyt.easyui.common;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;

/**
 * 公共的Servlet
 * 
 * @author Administrator
 * @since 2016年11月10日
 */
public class AppServlet extends HttpServlet {

	private static final long serialVersionUID = 1L;

	protected void print(HttpServletResponse response, Object obj) {
		response.setContentType("text/html; charset=UTF-8");
		PrintWriter writer = null;
		try {
			writer = response.getWriter();
			writer.print(obj);
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (writer != null) {
				writer.flush();
				writer.close();
			}
		}
	}
}
